// pages/kj/history/history.js
//获取应用实例
var api = require("../../../api.js"), app = getApp()

Page({
  data: {
    list: [],
  },
  //事件处理函数
  onLoad: function (options) {
    console.log("====onLoad=====")
    console.log(options)
    
    app.pageOnLoad(this), this.jia_tou(options);
  },

  jia_tou: function(options){
    var id = options.id
    this.setData({
      id: options.id
    })
    let _that = this
    // 系统以及好友帮我砍下金额列表
    app.request({
      url: api.kanjia.list,
      method: "get",
      data: {
        gid: id
      },
      success: function (res) {
        var goods = res.data.list;
        _that.setData({
          goods: goods,
        })
        console.log("list")
        console.log(res)
      },
      fail: function(){console.log("fail")}
    
    });
  }

})
